﻿using System.Web.Mvc;

namespace CodeContrib.Web.Mvc
{
	public class UnauthorizedAjaxResult : JavaScriptResult
	{
		public UnauthorizedAjaxResult(string loginUrl)
		{
			Guard.NotNullOrEmpty(loginUrl, "loginUrl");

			Script = string.Format("window.location=\"{0}\";", loginUrl);
		}
	}
}